package com.yeung.exam;

import java.util.Scanner;

public class 递归查找数字 {
    static int[] numbsers = null;

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String line = scanner.nextLine();
        //        {11,13,15,17,19,21}
        String[] split = line.substring(0, line.length() - 1).substring(1).split(",");

        numbsers = new int[split.length];
        for (int i = 0; i < split.length; i++) {
            numbsers[i] = Integer.valueOf(split[i]);
        }
        int obj = 19;
        int low = 0;
        int high = numbsers.length - 1;
        int pos = find(obj, low, high);

        if (pos != -1)
            System.out.println(pos + 1);
        else
            System.out.println(pos);


    }

    public static int find(int obj, int low, int high) {
        if (low >= high) return -1;
        else {
            int mid = low + high;
            if (numbsers[mid] == obj) return mid;
            else if (numbsers[mid] < obj) return find(obj, mid + 1, high);
            else return find(obj, low, mid - 1);
        }

    }
}
